<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>钱江黑盒后台</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
	<meta name="renderer" content="webkit">
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> 
	<link rel="stylesheet" type="text/css" href="/css/reset.css">
	<link rel="stylesheet" type="text/css" href="/css/admin/index.css">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta HTTP-EQUIV="pragma" CONTENT="no-cache"> 
	<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
	<meta HTTP-EQUIV="expires" CONTENT="0">
</head>
<body>
	<script type="text/javascript">
		window.history.replaceState('', '', '/page/admin/');
	</script>
	<script src="/js/common/utils.js"></script>
	<div class="header">
		<div class="header-wrap w">
			<h2>钱江黑盒管理系统</h2> 
			<div class="header-op">
				<div>管理商品</div>
			</div>
			<em>你好，${adminSession.username }</em>
		</div>
	</div>
	<div class="main w2">
		<div class="goods-h clearfix">
			<span class="goods-count">统计：${fn:length(goodsList) }个</span>
			<select class="goods-state">
				<option>全部（未开放）</option>
				<option>已通过（未开放）</option>
				<option selected="selected">未审核</option>
				<option>未通过（未开放）</option>
				<option>已下架（未开放）</option>
			</select>
			<div class="goods-search">搜索</div>
			<input class="goods-input" placeholder="搜索" />
		</div>
		<div class="goods-list">
			<div class="list-title">
				<span style="flex: 1;">商品名称</span>
				<span style="flex: 2;">商品图片</span>
				<span style="flex: 2;">商品详情</span>
				<span style="flex: 1;">商品价格</span>
				<span style="flex: 2;">商品标签</span>
				<span style="flex: 1;">商品数量</span>
				<span style="flex: 1;">发布时间</span>
				<span style="flex: 1;">操作</span>
			</div>
			<div class="list-wrap">
				<c:if test="${not empty goodsList }">
					<c:forEach items="${goodsList }" var="goods">
						<div class="list-item">
							<div class="goods-name">${goods.name }</div>
							<div class="goods-imgs">
								<c:forEach items="${fn:split(goods.imgPath, ';') }" var="img">
									<img src="${img }" alt="发布图片" />
								</c:forEach>
							</div>
							<div class="goods-details">
								<p style="line-height: 18px;">${goods.details }</p>
							</div>
							<div class="goods-price">¥${goods.realPrice }</div>
							<div class="goods-labels">
								<c:forEach items="${fn:split(goods.label, '####TPL####') }" var="label">
									<div>${label }</div>
								</c:forEach>
							</div>
							<div class="goods-count">${goods.count }</div>
							<div class="goods-time"><fmt:formatDate value="${goods.time}" pattern="yyyy-MM-dd HH:mm:ss" /></div>
							<div class="goods-op">
								<a href="<c:url value='/admin/pass.do?id=${goods.gid }' />">通过</a>
								<a href="<c:url value='/admin/notPass.do?id=${goods.gid }' />">不通过</a>
							</div>
						</div>
					</c:forEach>
				</c:if>
			</div>
		</div>
	</div>
</body>
</html>